package de.ventu.picpic.controls
{
    import fl.controls.TileList;
    import fl.controls.ScrollBarDirection;
    import fl.data.DataProvider;
    import flash.display.MovieClip;
    import flash.text.TextFormat;
    import flash.display.Stage;
    
	public class ImageTileList extends TileList implements IImage
	{
		public function ImageTileList(canvas:Stage, posX:Number, posY:Number)
		{
		    super();
		    
		    this.dataProvider = new DataProvider();
		    		    
		    this.setStyle("contentPadding", 0);
		    
		    this.rowHeight = 120;
		    this.columnWidth = 100;
		    
		    this.rowCount = 5;
		    this.columnCount = 7
		    
		    this.direction = ScrollBarDirection.VERTICAL;
		    		    
		    var tf:TextFormat = new TextFormat(); 
            tf.font = "Arial";
            tf.size = 8;
            tf.align = "center"; 
            this.setRendererStyle("textFormat", tf);
            
            //this.width = canvas.width;
            //this.height = canvas.height;
            
            this.move(posX,posY);
                        
            canvas.addChild(this);
		}
		
		public function addImages(images:Array):void
		{
           this.dataProvider.addItems(images);
		}
	}
}